home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsIFrameDebug.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  136 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37. #ifndef nsIFrameDebug_h___
  38. #define nsIFrameDebug_h___
  39.  
  40. #include "nsISupports.h"
  41. #include "nsIFrame.h"
  42.  
  43. class nsPresContext;
  44. struct PRLogModuleInfo;
  45.  
  46. // IID for the nsIFrameDebug interface {a6cf9069-15b3-11d2-932e-00805f8add32}
  47. #define NS_IFRAMEDEBUG_IID         \
  48. { 0xa6cf9069, 0x15b3, 0x11d2, \
  49.   {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
  50.  
  51. /**
  52.  * Debug related functions
  53.  */
  54. class nsIFrameDebug : public nsISupports {
  55. public:
  56.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFRAMEDEBUG_IID)
  57.   
  58.   NS_IMETHOD  List(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent) const = 0;
  59.   /**
  60.    * lists the frames beginning from the root frame
  61.    * - calls root frame's List(...)
  62.    */
  63.   static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent);
  64.   /**
  65.    * Get a printable from of the name of the frame type.
  66.    * XXX This should be eliminated and we use GetType() instead...
  67.    */
  68.   NS_IMETHOD  GetFrameName(nsAString& aResult) const = 0;
  69.   /**
  70.    * Return the state bits that are relevant to regression tests (that is, those bits which indicate a real difference when they differ
  71.    */
  72.   NS_IMETHOD_(nsFrameState)  GetDebugStateBits() const = 0;
  73.   /**
  74.    * Called to dump out regression data that describes the layout
  75.    * of the frame and it's children, and so on. The format of the
  76.    * data is dictated to be XML (using a specific DTD); the
  77.    * specific kind of data dumped is up to the frame itself, with
  78.    * the caveat that some base types are defined.
  79.    * For more information, see XXX.
  80.    *
  81.    * Argument aIncludeStyleData: if PR_TRUE, style information is dumpted, otherwise it is not
  82.    */
  83.   NS_IMETHOD  DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData) = 0;
  84.  
  85.   NS_IMETHOD  VerifyTree() const = 0;
  86.  
  87.   /**
  88.    * See if tree verification is enabled. To enable tree verification add
  89.    * "frameverifytree:1" to your NSPR_LOG_MODULES environment variable
  90.    * (any non-zero debug level will work). Or, call SetVerifyTreeEnable
  91.    * with PR_TRUE.
  92.    */
  93.   static PRBool GetVerifyTreeEnable();
  94.  
  95.   /**
  96.    * Set the verify-tree enable flag.
  97.    */
  98.   static void SetVerifyTreeEnable(PRBool aEnabled);
  99.  
  100.   /**
  101.    * See if style tree verification is enabled. To enable style tree 
  102.    * verification add "styleverifytree:1" to your NSPR_LOG_MODULES 
  103.    * environment variable (any non-zero debug level will work). Or, 
  104.    * call SetVerifyStyleTreeEnable with PR_TRUE.
  105.    */
  106.   static PRBool GetVerifyStyleTreeEnable();
  107.  
  108.   /**
  109.    * Set the verify-style-tree enable flag.
  110.    */
  111.   static void SetVerifyStyleTreeEnable(PRBool aEnabled);
  112.  
  113.   /**
  114.    * The frame class and related classes share an nspr log module
  115.    * for logging frame activity.
  116.    *
  117.    * Note: the log module is created during library initialization which
  118.    * means that you cannot perform logging before then.
  119.    */
  120.   static PRLogModuleInfo* GetLogModuleInfo();
  121.  
  122.   // Show frame borders when rendering
  123.   static void ShowFrameBorders(PRBool aEnable);
  124.   static PRBool GetShowFrameBorders();
  125.  
  126.   // Show frame border of event target
  127.   static void ShowEventTargetFrameBorder(PRBool aEnable);
  128.   static PRBool GetShowEventTargetFrameBorder();
  129.  
  130. private:
  131.   NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
  132.   NS_IMETHOD_(nsrefcnt) Release(void) = 0;
  133. };
  134.  
  135. #endif /* nsIFrameDebug_h___ */
  136.